<?php

class UsermenuView implements View
{
    protected $entries = array();
    
    public function __construct()
    {
        $this->entries = array(
    		'generalmenu' => array(
    			//'overview',
    			'planetview',
    			'empireoverview',
    			'buildings',
    			'resources',
    			'tech',
    			'hangar',
    			'fleet',
    			'techtree',
    			'galaxy',
    			'defense',
    		),
    		'infosmenu' => array(
    			//'alliance',
    			'statistics',
    			'search',
    			//'color_priority_three' => 'pillory',
    			//'help',
    		),
    		'usermenu' => array(
    			'messages',
    			//'notes',
    			//'buddylist',
    			'forum',
    			'color_priority_two' => 'contact',
    			'settings',
    			//'legal_notice',
    			'color_priority_one' => 'logout',
    		),
    	);
    }
    
    public function data()
    {
        $ret = array(
            #'cat' => array()
        );
        foreach ($this->entries as $catname => $earr) {
            $cat = array(
                'dpath' => '',
                'catimage' => '',
                'altimage' => '',
                'link' => array()
            );
            foreach ($earr as $class => $entry) {
                $cat['link'][] = array(
                    'title' => $entry,
                    'href' => '',
                    'a_key' => '',
                    'class' => !is_int($class) ? $class : '',
                    'inner_html' => '{L_'.strtoupper($entry).'}'
                ); 
            }
            $ret[] = $cat;
        }
        return $ret;/*array(
            'cat' => array(
                array(
                    'link' => array(
                        array(
                            'title' => ''
                        )
                    )
                )
            )
        );*/
    }
    
    public function module()
    {
        return 'usermenu';
    }
    
    public function templateFile()
    {
        return 'usermenu';
    }
}